﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xant.FlowEngine.Core
{
    public class ProcessTemplateException : Exception
    {
        public ProcessTemplateExceptionType ExceptionType { get; internal set; }

        public ProcessTemplateException(ProcessTemplateExceptionType exceptionType, string message) : base(message)
        {
            this.ExceptionType = exceptionType;
        }

        public ProcessTemplateException(ProcessTemplateExceptionType exceptionType) : this(exceptionType, null)
        {
        }

    }

    public enum ProcessTemplateExceptionType
    {
        /// <summary>
        /// 缺少开始活动
        /// </summary>
        MissStartActivity,
        /// <summary>
        /// 缺少结束活动
        /// </summary>
        MissEndActivity,
        /// <summary>
        /// 路径不通
        /// </summary>
        PathDisconnected,
    }

}
